<template>
	<uni-popup ref="popup">
		<view class="popup-content">
			<view class="text">
				退款金额按实际支付金额按原来返回
			</view>
			<view class="btn" @click="submit">
				确定
			</view>
		</view>
	</uni-popup>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		props: {
			orderId: {
				default: ''
			},
		},
		onShow() {
			
		},
		methods: {
			open() {
				this.$refs.popup.open()
			},
			close() {
				this.$refs.popup.close()
			},
			submit(){
				// console.log(this.orderId)
				//执行退款逻辑

					this.$post(`/order/orderRefund`, {
							orderId: this.orderId
						}).then(res => {
							this.$toast("退款成功")
							window.location.reload()
						})

				this.close()
			}
		}
	}
</script>

<style lang="scss">
	.popup-content {
		background-color: #C4E4DB;
		padding: 60rpx;
		border-radius: 30rpx;
		width: 550rpx;

		.text {
			font-weight: bold;
			font-size: 36rpx;
		}

		.btn {
			margin: 0 auto;
			margin-top: 80rpx;
			width: 250rpx;
			line-height: 90rpx;
			border-radius: 25px;
			background-color: $assist-color2;
			// color: #fff;
			border: 2rpx solid #A4ADB3;
			font-size: 36rpx;
			text-align: center;
		}
	}
</style>